#include"astnodes.h"
void RegularExpressionNode_char::printAST(int pad, std::ostream &out)
{
    out<<std::string(pad,' ')<<"RegularExpressionNode_char\n";
    out<<std::string(pad,' ')<<"    char:"<<ch<<"\n";
}

void RegularExpressionNode_or::printAST(int pad,std::ostream&out){
    out<<std::string(pad,' ')<<"RegularExpressionNode_or\n";
    out<<std::string(pad,' ')<<"    exp1:\n";
    exp1->printAST(pad+4,out);
    out<<std::string(pad,' ')<<"    exp2:\n";
    exp2->printAST(pad+4,out);
}

void RegularExpressionNode_concat::printAST(int pad,std::ostream&out){
    out<<std::string(pad,' ')<<"RegularExpressionNode_concat\n";
    out<<std::string(pad,' ')<<"    exp1:\n";
    exp1->printAST(pad+4,out);
    out<<std::string(pad,' ')<<"    exp2:\n";
    exp2->printAST(pad+4,out);
}

void RegularExpressionNode_star::printAST(int pad,std::ostream&out){
    out<<std::string(pad,' ')<<"RegularExpressionNode_star\n";
    out<<std::string(pad,' ')<<"    exp:\n";
    exp->printAST(pad+4,out);
}


void RegularExpressionNode_paren::printAST(int pad,std::ostream&out){
    out<<std::string(pad,' ')<<"RegularExpressionNode_paren\n";
    out<<std::string(pad,' ')<<"    exp:\n";
    exp->printAST(pad+4,out);
}

void RegularExpressionNode_null::printAST(int pad,std::ostream&out){
    out<<std::string(pad,' ')<<"RegularExpressionNode_null\n";
}
